﻿Imports Microsoft.Xna.Framework.Graphics
Imports Runa.Resources.ResourceManager
Imports Runa.Core.Services
Imports Runa.Foundation.Diagnostics
Imports Runa.Graphics.Effects
Imports Runa.UI.Controls

Partial Public Class GameRender
    Implements IGameParameterService

    Public Overloads Property Name() As String
    Public Property Author() As String
    Public Property WindowHeight() As Integer
    Public Property WindowWidth() As Integer
    Public Property Fps() As Long = 333333 Implements IGameParameterService.Fps
    Public Property GameContentRoot() As String

    Public Property LoadProgress() As Integer = 0 Implements IGameParameterService.LoadProgress
    Public Property SpriteBatchs() As New Dictionary(Of String, SpriteBatch) Implements IGameParameterService.SpriteBatchs
    Public Property Fonts() As New Dictionary(Of String, FontObject) Implements IGameParameterService.Fonts
    Public Property Textures() As New Dictionary(Of String, Texture2DObject) Implements IGameParameterService.Textures
    Public Property Audios() As New Dictionary(Of String, AudioObject) Implements IGameParameterService.Audios
    Public Property Effects() As New Dictionary(Of String, EffectBase) Implements IGameParameterService.Effects
    Public Property Pages() As New Dictionary(Of String, Page)

    Public Property LastScreenShot() As RenderTarget2D Implements IGameParameterService.LastScreenShot
    Public Property GPUAccelerationEnabled() As Boolean = False Implements IGameParameterService.GPUAccelerationEnabled

    Public Property GameTracer() As Tracer Implements IGameParameterService.GameTracer

#If WINDOWS_PHONE Then
    Public ReadOnly Property GraphicsDevice() As GraphicsDevice
        Get
            Return Me.m_graphics.GraphicsDevice
        End Get
    End Property
#End If

    Public Sub BeginTakeScreenShot() Implements IGameParameterService.BeginTakeScreenShot
        Me.m_screenShotGotton = True
    End Sub

    Public Sub EndTakeScreenShot() Implements IGameParameterService.EndTakeScreenShot
        Me.m_screenShotGotton = False
        Me.GraphicsDevice.SetRenderTarget(Nothing)
    End Sub

    Public ReadOnly Property IsHiDefSupported As Boolean Implements IGameParameterService.IsHiDefSupported
        Get
            Return False
        End Get
    End Property

End Class